﻿<Window
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" 
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" 
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008" 
	xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
	mc:Ignorable="d"
	xmlns:hvr="clr-namespace:nRoute.Samples.FutureDesktop.Behaviors"
	xmlns:local="clr-namespace:nRoute.Samples.FutureDesktop.Controls"
	xmlns:i="clr-namespace:System.Windows.Interactivity;assembly=System.Windows.Interactivity" 
	xmlns:n="http://nRoute/schemas/2010/xaml"
	x:Class="nRoute.Samples.FutureDesktop.Workspaces"
	MinWidth="800" MinHeight="650" d:DesignWidth="800" d:DesignHeight="650">

    <!-- RESOURCES -->
    <Window.Resources>
        
        <n:ValueRelay x:Key="ParameterValueRelay" />
        <n:ValueConverterRelay x:Key="DateTimeConverterRelay" />
        <n:ValueConverterRelay x:Key="ActiveWorkspaceUrlConverterRelay" />
		<n:CommandRelay x:Key="SetActiveWorkspaceCommandRelay" />
        
        <DataTemplate x:Key="WorkspaceDataTemplate">
        	<local:WorkspaceControl IsActive="{Binding IsActive}">
        		<i:Interaction.Triggers>
        			<i:EventTrigger EventName="ActivateWorkspace">
        				<n:ExecuteCommandAction 
							Command="{StaticResource SetActiveWorkspaceCommandRelay}"
							Parameter="{Binding}"/>
        			</i:EventTrigger>
        		</i:Interaction.Triggers>
        	</local:WorkspaceControl>
        </DataTemplate>
        
    </Window.Resources>
	
	<!-- VIEW MODEL -->	
	<i:Interaction.Behaviors>
		<n:BridgeViewModelBehavior/>
		<n:BridgeCommandBehavior CommandRelay="{StaticResource SetActiveWorkspaceCommandRelay}"
                                          CommandSource="{Binding SetActiveWorkspaceCommand}"/>
		<hvr:BorderlessWindowBehavior/>
	</i:Interaction.Behaviors>
	
    <!-- KEYBOARD ACTION MAPPINGS, MAPPED TO/WITH THE USER CONTROL -->
	<i:Interaction.Triggers>
		<n:KeyTrigger Key="D1" WithControlModifier="True" WithShiftModifier="True">
			<n:ExecuteCommandAction Parameter="0" Command="{Binding SetActiveWorkspaceIndexCommand, Mode=OneWay}"/>
		</n:KeyTrigger>
		<n:KeyTrigger Key="D2" WithControlModifier="True" WithShiftModifier="True">
			<n:ExecuteCommandAction Parameter="1" Command="{Binding SetActiveWorkspaceIndexCommand, Mode=OneWay}"/>
		</n:KeyTrigger>
		<n:KeyTrigger Key="D3" WithControlModifier="True" WithShiftModifier="True">
			<n:ExecuteCommandAction Parameter="2" Command="{Binding SetActiveWorkspaceIndexCommand, Mode=OneWay}"/>
		</n:KeyTrigger>
		<n:KeyTrigger Key="D4" WithControlModifier="True" WithShiftModifier="True">
			<n:ExecuteCommandAction Parameter="3" Command="{Binding SetActiveWorkspaceIndexCommand, Mode=OneWay}"/>
		</n:KeyTrigger>
		<n:KeyTrigger Key="D5" WithControlModifier="True" WithShiftModifier="True">
			<n:ExecuteCommandAction Parameter="4" Command="{Binding SetActiveWorkspaceIndexCommand, Mode=OneWay}"/>
		</n:KeyTrigger>
		<n:KeyTrigger Key="D6" WithControlModifier="True" WithShiftModifier="True">
			<n:ExecuteCommandAction Parameter="5" Command="{Binding SetActiveWorkspaceIndexCommand, Mode=OneWay}"/>
		</n:KeyTrigger>
		<n:KeyTrigger Key="D7" WithControlModifier="True" WithShiftModifier="True">
			<n:ExecuteCommandAction Parameter="6" Command="{Binding SetActiveWorkspaceIndexCommand, Mode=OneWay}"/>
		</n:KeyTrigger>
		<n:KeyTrigger Key="D8" WithControlModifier="True" WithShiftModifier="True">
			<n:ExecuteCommandAction Parameter="7" Command="{Binding SetActiveWorkspaceIndexCommand, Mode=OneWay}"/>
		</n:KeyTrigger>
		<n:KeyTrigger Key="D9" WithControlModifier="True" WithShiftModifier="True">
			<n:ExecuteCommandAction Parameter="8" Command="{Binding SetActiveWorkspaceIndexCommand, Mode=OneWay}"/>
		</n:KeyTrigger>
		<n:KeyTrigger Key="R" WithControlModifier="True" WithShiftModifier="True">
			<n:RefreshNavigationAction />
		</n:KeyTrigger>
		<n:KeyTrigger Key="M" WithControlModifier="True" WithShiftModifier="True">
			<n:NavigateAction Url="Home"/>
		</n:KeyTrigger>
		<n:KeyTrigger Key="N" WithControlModifier="True" WithShiftModifier="True">
			<n:ExecuteCommandAction Command="{Binding AddNewWorkspaceCommand, Mode=OneWay}"/>
		</n:KeyTrigger>
		<n:KeyTrigger Key="W" WithControlModifier="True" WithShiftModifier="True">
			<n:ExecuteCommandAction Command="{Binding CloseActiveWorkspaceCommand, Mode=OneWay}"/>
		</n:KeyTrigger>
		<i:EventTrigger>
			<n:ExecuteCommandAction Parameter="0" Command="{Binding SetActiveWorkspaceIndexCommand, Mode=OneWay}"/>
		</i:EventTrigger>
	</i:Interaction.Triggers>
    
	<!-- CONTENT -->
	<Border Background="{StaticResource DesktopBkgRadialBrush}">
		<Grid x:Name="LayoutRoot">

            <Grid.RowDefinitions>
				<RowDefinition Height="*"/>
				<RowDefinition Height="56"/>
			</Grid.RowDefinitions>
			<Grid.ColumnDefinitions>
				<ColumnDefinition Width="63"/>
				<ColumnDefinition/>
				<ColumnDefinition Width="205"/>
			</Grid.ColumnDefinitions>
			
            <!-- BACKGROUNDS, INNER AND OUTER 
			<Border Height="Auto" Width="Auto" BorderBrush="#FF312B23" BorderThickness="1,1,1,1" 
                    x:Name="BkgBrownBorder" Grid.ColumnSpan="3" Grid.RowSpan="2" Visibility="Visible"/>
			<Border Height="Auto" Width="Auto" BorderBrush="{x:Null}" 
                    BorderThickness="1,1,1,1" Margin="-1,0,0,-1" x:Name="BkgWorkspaceBorder" Grid.Column="1" 
                    Background="{StaticResource WorkspaceBkgLinearBrush}"/>-->
					
			<Border Background="Transparent" Grid.Column="0" Grid.RowSpan="2" 
				MouseLeftButtonDown="SidePanels_MouseLeftButtonDown" />
				
			<Border Background="Transparent" Grid.Column="2" Grid.RowSpan="2" 
				MouseLeftButtonDown="SidePanels_MouseLeftButtonDown" />
            
            <!-- LEFT SIDE TOP CONTENT GRID -->
			<Grid Margin="0,20,0,150" Width="60" HorizontalAlignment="Left" VerticalAlignment="Top" Height="Auto">
				<Grid.OpacityMask>
					<LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
						<GradientStop Color="#00000000" Offset="1"/>
						<GradientStop Color="#FFFFFFFF" Offset="0.915"/>
					</LinearGradientBrush>
				</Grid.OpacityMask>

                <!-- HyperlinkButton -->
				<Button Style="{StaticResource ChromeButtonStyle}"
					Margin="-220.9,353.149,0,0" Width="500" 
					RenderTransformOrigin="0.5,0.5" 
					Height="Auto" FontSize="22" Foreground="{StaticResource ForegroundLight1ColourBrush}" 
					HorizontalAlignment="Left" x:Name="TitleText" VerticalAlignment="Top" 
					d:LayoutOverrides="Height" FontFamily="Arial" Cursor="Hand"
					Content="ORKTANE.COM" HorizontalContentAlignment="Left">
					<Button.RenderTransform>
						<TransformGroup>
							<ScaleTransform/>
							<SkewTransform/>
							<RotateTransform Angle="90"/>
							<TranslateTransform/>
						</TransformGroup>
					</Button.RenderTransform>
				</Button>
                
                <!-- NEXT PREVIOUS ARROWS -->
				<TextBlock
					Height="Auto" Margin="12.501,37.161,7.499,0" x:Name="BackText" VerticalAlignment="Top" 
					FontFamily="Webdings" FontSize="40" Foreground="{StaticResource ForegroundLight1ColourBrush}" Text="3" 
					TextWrapping="Wrap"  ToolTipService.ToolTip="Navigate Back" Cursor="Hand" d:LayoutOverrides="Width">
					<i:Interaction.Behaviors>
						<hvr:TextBlockHoverBehavior HoverForeground="{StaticResource ForegroundLight2ColourBrush}"/>
					</i:Interaction.Behaviors>
					<i:Interaction.Triggers>
						<i:EventTrigger EventName="MouseLeftButtonUp">
							<n:ExecuteCommandAction Command="{Binding ActivatePreviousWorkspace}" IsEnabled="False"/>
							<n:DirectionalNavigateAction Direction="Back"/>
						</i:EventTrigger>
					</i:Interaction.Triggers>
				</TextBlock>
				<TextBlock Height="Auto" Margin="8.665,70.002,11.335,0" VerticalAlignment="Top" FontFamily="Webdings" 
                           FontSize="40" Foreground="{StaticResource ForegroundLight1ColourBrush}" Text="4" TextWrapping="Wrap" 
                           ToolTipService.ToolTip="Navigate Forward"
                           Cursor="Hand" x:Name="ForwardText" d:LayoutOverrides="Width">
					<i:Interaction.Behaviors>
						<hvr:TextBlockHoverBehavior HoverForeground="{StaticResource ForegroundLight2ColourBrush}"/>
					</i:Interaction.Behaviors>
					<i:Interaction.Triggers>
						<i:EventTrigger EventName="MouseLeftButtonUp">
							<n:ExecuteCommandAction Command="{Binding ActivateNextWorkspace}" IsEnabled="False"/>
							<n:DirectionalNavigateAction Direction="Forward"/>
						</i:EventTrigger>
					</i:Interaction.Triggers>
				</TextBlock>
                
                <!-- LEFT TOP CLOSE / LOG OUT BUTTON -->
				<Button Style="{StaticResource ChromelessButtonStyle}" HorizontalAlignment="Center" Margin="0,5,0,0"
					VerticalAlignment="Top">					
					<i:Interaction.Triggers>
						<i:EventTrigger EventName="Click">
							<n:ExecuteCommandAction Command="{Binding CloseActiveWorkspaceCommand, Mode=OneWay}" ManageEnableState="True"/>
						</i:EventTrigger>
					</i:Interaction.Triggers>
					<TextBlock Height="Auto" FontFamily="Webdings" FontSize="18" Cursor="Hand"
	                           Foreground="{StaticResource ForegroundLight1ColourBrush}" Text="r" TextWrapping="Wrap" 
	                           x:Name="CloseText" Opacity="1">
						<i:Interaction.Behaviors>
							<hvr:TextBlockHoverBehavior HoverForeground="{StaticResource ForegroundLight2ColourBrush}"/>
						</i:Interaction.Behaviors>					
					</TextBlock>
                </Button>
			</Grid>
			
			<StackPanel Grid.Column="2" HorizontalAlignment="Right" VerticalAlignment="Top" Orientation="Horizontal">
				<Button HorizontalAlignment="Right" Margin="0,6,6,0" VerticalAlignment="Top" 
				Style="{StaticResource ChromeButtonStyle}" Click="MinimizeButton_Click">
					<TextBlock TextWrapping="Wrap" Text="0" FontFamily="Webdings" Foreground="#FFB4B4B4" FontSize="13.333"/>
				</Button>
	        	<Button HorizontalAlignment="Right" Margin="0,6,6,0" VerticalAlignment="Top" 
					Style="{StaticResource ChromeButtonStyle}" Click="RestoreButton_Click">
					<TextBlock TextWrapping="Wrap" Text="1" FontFamily="Webdings" Foreground="#FFB4B4B4" FontSize="13.333"/>
				</Button>
	        	<Button HorizontalAlignment="Right" Margin="0,6,6,0" VerticalAlignment="Top" 
					Style="{StaticResource ChromeButtonStyle}" Click="CloseButton_Click">
					<TextBlock TextWrapping="Wrap" Text="r" FontFamily="Webdings" Foreground="#FFB4B4B4" FontSize="13.333" />
				</Button>
			</StackPanel>

            <!-- RIGHT SIDE TOP USER INFO -->
            <TextBlock Height="Auto" Margin="8,45,12,0" VerticalAlignment="Top" FontSize="26" TextWrapping="Wrap" 
                       FontFamily="Arial" Grid.Column="2" x:Name="SideTitleText" 
                       Foreground="{StaticResource ForegroundLight2ColourBrush}"><Run Text="SHANNON'S"/><Run Text=" "/><LineBreak/><Run Text="CLASSROOM"/></TextBlock>
            
            <!-- BOTTOM GRID -->
			<Grid HorizontalAlignment="Stretch" Margin="68.5,0,0,1" Width="Auto" Grid.Column="1" Grid.Row="1" 
                  Background="#FF7C6E65" x:Name="BottomGrid">
                
				<Grid.ColumnDefinitions>
					<ColumnDefinition Width="10"/>
					<ColumnDefinition Width="76"/>
					<ColumnDefinition/>
					<ColumnDefinition Width="27"/>
				</Grid.ColumnDefinitions>

                <!-- HOME BUTTON -->
                <Border Background="{StaticResource BkgDarkColourBrush}" CornerRadius="12,12,12,12" Cursor="Hand"
                        HorizontalAlignment="Center" VerticalAlignment="Center" Width="75" Height="27" 
                        BorderThickness="2,2,2,2" BorderBrush="{StaticResource LightShadedBorderBrush}" Grid.Column="1">
                	<i:Interaction.Triggers>
                		<i:EventTrigger EventName="MouseLeftButtonUp">
                			<n:NavigateAction Url="Home"/>
                		</i:EventTrigger>
                	</i:Interaction.Triggers>
                    <TextBlock Height="Auto" HorizontalAlignment="Center" VerticalAlignment="Center" Width="Auto" 
                            FontFamily="Trebuchet MS" FontSize="14" FontWeight="Normal" 
                            Foreground="{StaticResource ForegroundLight1ColourBrush}" 
                            Text="HOME •" TextWrapping="NoWrap" Margin="4,2,0,0" TextAlignment="Center"/>
                </Border>
                <Grid VerticalAlignment="Center" Grid.Column="2">
                	<Grid.ColumnDefinitions>
                		<ColumnDefinition Width="90"/>
                		<ColumnDefinition MinWidth="180" MaxWidth="600" Width="0.837*"/>
                		<ColumnDefinition Width="34"/>
                		<ColumnDefinition Width="0.163*" />
                	</Grid.ColumnDefinitions>
                    
                	<!-- NEW WORKSPACE BUTTON -->    
                	<Button Style="{StaticResource ChromelessButtonStyle}" Margin="0,0,5,0" Height="30" Width="30" 
						HorizontalAlignment="Left" ToolTipService.ToolTip="Add New Workspace">
                		<i:Interaction.Triggers>
                			<i:EventTrigger EventName="Click">
                				<n:ExecuteCommandAction Command="{Binding AddNewWorkspaceCommand, Mode=OneWay}" ManageEnableState="True"/>
                			</i:EventTrigger>
                		</i:Interaction.Triggers>
                		<Path Data="M10.756389,13.036674 L14.680822,13.036674 L14.680822,20.599087 L22.31485,20.599087 L22.31485,24.437586 L14.680822,24.437586 L14.680822,32 L10.756389,32 L10.756389,24.437586 L3.1223605,24.437586 L3.1223605,20.599087 L10.756389,20.599087 z" Height="18.963" RenderTransformOrigin="0.5,0.5" Stretch="Fill" UseLayoutRounding="False" Width="19.193" Margin="0,1,0,0">
                			<Path.Fill>
                				<LinearGradientBrush ColorInterpolationMode="SRgbLinearInterpolation" EndPoint="0.5,1" MappingMode="RelativeToBoundingBox" SpreadMethod="Pad" StartPoint="0.5,0">
                					<LinearGradientBrush.RelativeTransform>
                						<MatrixTransform Matrix="Identity"/>
                					</LinearGradientBrush.RelativeTransform>
                					<LinearGradientBrush.Transform>
                						<MatrixTransform Matrix="Identity"/>
                					</LinearGradientBrush.Transform>
                					<GradientStop Color="White" Offset="0.603"/>
                					<GradientStop Color="#FFBFB8B8" Offset="0.062"/>
                				</LinearGradientBrush>
                			</Path.Fill>
                			<Path.RenderTransform>
                				<TransformGroup>
                					<ScaleTransform/>
                					<SkewTransform/>
                					<RotateTransform/>
                					<TranslateTransform/>
                				</TransformGroup>
                			</Path.RenderTransform>
                		</Path>
                	</Button>
					
					<!-- FAVORITES BUTTON -->    
                	<Button Style="{StaticResource ChromelessButtonStyle}" Margin="30,0,5,0" Height="30" Width="30" 
						HorizontalAlignment="Left" ToolTipService.ToolTip="Refresh">
                		<i:Interaction.Triggers>
                			<i:EventTrigger EventName="Click">
                				<n:RefreshNavigationAction/>
                			</i:EventTrigger>
                		</i:Interaction.Triggers>
                		<Path Data="M18.075315,3.5370483 C19.832241,4.3868656 21.216774,5.6997833 22.228914,7.4758053 C23.202862,9.1754398 23.689835,11.027849 23.689835,13.033034 C23.689835,14.570343 23.374733,16.021717 22.744534,17.387152 C22.076138,18.809879 21.140385,19.960472 19.937273,20.838936 L21.5271,22.085014 L16.413876,23.459999 L16.886526,18.375422 L18.318802,19.50692 C19.79882,18.198774 20.53883,16.379784 20.53883,14.04995 C20.53883,11.061269 19.116102,8.7266598 16.270649,7.0461235 z M12.604024,3.5370483 L12.131372,8.6216259 L10.699098,7.4901285 C9.219079,8.7982731 8.4790707,10.617264 8.4790707,12.947098 C8.4790707,15.93578 9.9017973,18.270388 12.747252,19.950924 L10.942584,23.459999 C9.1952076,22.610182 7.8154488,21.297264 6.803308,19.521242 C5.8198118,17.821609 5.328064,15.969199 5.3280644,13.964013 C5.328064,12.426704 5.6479392,10.975332 6.2876892,9.6098957 C6.9560843,8.1871691 7.887063,7.0365753 9.0806265,6.1581116 L7.4908004,4.8977108 z" Height="19.923" RenderTransformOrigin="0.5,0.5" Stretch="Fill" UseLayoutRounding="False" Width="18.362" Margin="0,2,0,0">
                			<Path.Fill>
                				<LinearGradientBrush ColorInterpolationMode="SRgbLinearInterpolation" EndPoint="0.5,1" MappingMode="RelativeToBoundingBox" SpreadMethod="Pad" StartPoint="0.5,0">
                					<LinearGradientBrush.RelativeTransform>
                						<MatrixTransform Matrix="Identity"/>
                					</LinearGradientBrush.RelativeTransform>
                					<LinearGradientBrush.Transform>
                						<MatrixTransform Matrix="Identity"/>
                					</LinearGradientBrush.Transform>
                					<GradientStop Color="White" Offset="0.603"/>
                					<GradientStop Color="#FFBFB8B8" Offset="0.062"/>
                				</LinearGradientBrush>
                			</Path.Fill>
                			<Path.RenderTransform>
                				<TransformGroup>
                					<ScaleTransform/>
                					<SkewTransform/>
                					<RotateTransform/>
                					<TranslateTransform/>
                				</TransformGroup>
                			</Path.RenderTransform>
                		</Path>
                	</Button>
                    
					<!-- FAVORITES BUTTON -->    
                	<Button Style="{StaticResource ChromelessButtonStyle}" Margin="60,0,5,0" Height="30" Width="30" 
						HorizontalAlignment="Left" ToolTipService.ToolTip="Favorites">
                		<i:Interaction.Triggers>
                			<i:EventTrigger EventName="Click">
                				<n:NavigateAction Url="Pages/AboutInformation"/>
                			</i:EventTrigger>
                		</i:Interaction.Triggers>
                		<Path Height="20" Width="22" RenderTransformOrigin="0.5,0.5" Stretch="Fill" StrokeThickness="1" Data="M19.742188,6.3887501 L22.216797,13.375078 L29.640625,13.375078 L23.707031,18.078203 L25.976563,25.228594 L19.742188,20.908281 L13.521484,25.228594 L15.791016,18.078203 L9.8574219,13.375078 L17.28125,13.375078 z">
                			<Path.Stroke>
                				<LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
                					<GradientStop Color="#FFFFFFFF" Offset="0.603"/>
                					<GradientStop Color="#FFBFB8B8" Offset="0.062"/>
                				</LinearGradientBrush>
                			</Path.Stroke>
                			<Path.Fill>
                				<RadialGradientBrush>
                					<GradientStop Color="#FFD6D6D6" Offset="0.862"/>
                					<GradientStop Color="#FFFFFFFF" Offset="0.415"/>
                				</RadialGradientBrush>
                			</Path.Fill>
                		</Path>
                	</Button>

                	<Border BorderBrush="{StaticResource ForegroundLight1ColourBrush}" 
                		BorderThickness="1,1,1.25,1.25" CornerRadius="10,10,10,10" Margin="5,0,3,0" Grid.Column="1">
                		<Border.Background>
                			<LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
                				<GradientStop Color="#FFFFFFFF" Offset="0.576"/>
                				<GradientStop Color="#FFE8DADA" Offset="0"/>
                			</LinearGradientBrush>
                		</Border.Background>
                        
                		<TextBox MinWidth="180"
                			Height="Auto" Margin="4,1,4,1" Width="Auto" Background="{x:Null}" BorderBrush="{x:Null}"
                			BorderThickness="0,0,0,0" FontFamily="Arial" FontSize="17" Foreground="#FF434343" 
                			Tag="{Binding ActiveWorkspace, Converter={StaticResource ActiveWorkspaceUrlConverterRelay}}" 
							x:Name="NavigateUrlText" TextWrapping="NoWrap" AcceptsReturn="false" MaxLength="1000" Padding="6,3,1,1">
                			<i:Interaction.Triggers>
                				<n:KeyTrigger Key="Enter">
                					<n:NavigateAction Url="{Binding Text, ElementName=NavigateUrlText, Mode=OneWay}"/>
                				</n:KeyTrigger>
                			</i:Interaction.Triggers>
                		</TextBox>                        
                	</Border>

					<!-- FUNCTION BUTTON -->
                	<Button Margin="2,0" Style="{StaticResource ChromelessButtonStyle}" d:LayoutOverrides="Width, Height" Grid.Column="2">
                		<i:Interaction.Triggers>
                			<i:EventTrigger EventName="Click">
                				<n:NavigateAction Url="{Binding Text, ElementName=NavigateUrlText, Mode=OneWay}"/>
                			</i:EventTrigger>
                		</i:Interaction.Triggers>
                		<Path Height="18" Width="24" RenderTransformOrigin="0.5,0.5" Stretch="Fill" Data="M13.992188,5.5171089 L19.441406,5.5171089 L26.667969,12.743671 L19.441406,19.98 L13.992188,19.98 L19.294922,14.677265 L8.6894531,14.677265 L8.6894531,10.819843 L19.294922,10.819843 z" StrokeThickness="1">
                			<Path.Stroke>
                				<LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
                					<GradientStop Color="#FF999090" Offset="0"/>
                					<GradientStop Color="#FFE4E4E4" Offset="0.598"/>
                				</LinearGradientBrush>
                			</Path.Stroke><Path.Fill>
                				<LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
                					<GradientStop Color="#FFD6CECE" Offset="0"/>
                					<GradientStop Color="#FFFFFFFF" Offset="0.335"/>
                				</LinearGradientBrush>
                			</Path.Fill>
                		</Path>
                	</Button>
                </Grid>
			</Grid>

            <!-- SIDE BAR / SIDE STACK PANEL -->
            <StackPanel Height="Auto" Margin="0,110,1,0" VerticalAlignment="Stretch" Grid.Column="2" Grid.RowSpan="2" 
                        x:Name="SideStackPanel" Width="200" d:IsLocked="True">
                <!-- ONLINE USER -->
                <Border
                        Height="45" BorderBrush="{StaticResource SideButtonBorderColourBrush}"  Cursor="Hand" 
                        BorderThickness="0,1,0,2" Margin="0,0,0,1">
                	<i:Interaction.Behaviors>
                		<hvr:BorderHoverBehavior HoverBackground="{StaticResource SideButtonSelectionBkgBrush}"/>
                	</i:Interaction.Behaviors>
                	<i:Interaction.Triggers>
                		<i:EventTrigger EventName="MouseLeftButtonUp">
                			<n:NavigateAction Url="Pages/FuturePage/LisaAbrotsContactPage/" HandlerName="EmptyBladeHandler"/>
                		</i:EventTrigger>
                	</i:Interaction.Triggers>
					<Grid Height="Auto" Width="Auto">
						<TextBlock Margin="37,6.166,0,18.834" Text="LISA ABROTS" TextWrapping="Wrap" 
                                   Foreground="{StaticResource ForegroundLight1ColourBrush}" FontFamily="Arial" FontSize="17"/>
						<TextBlock Height="Auto" Margin="37,0,0,4.669" VerticalAlignment="Bottom" Text="online at the library"
                                   TextWrapping="Wrap" Foreground="#FFD3C7B8" FontFamily="Arial"/>
						<Ellipse HorizontalAlignment="Left" Margin="8,8,0,18.834" Width="14" Height="14" 
                                 Fill="{StaticResource OnlineRadialBkgBrush}" Stroke="{StaticResource OnlineRadialBorderBrush}"/>
					</Grid>
				</Border>

                <!-- OFFLINE USER -->
                <Border Height="45" BorderBrush="{StaticResource SideButtonBorderColourBrush}" Cursor="Hand" 
                        BorderThickness="0,1,0,2" Margin="0,0,0,1">
                	<i:Interaction.Behaviors>
                		<hvr:BorderHoverBehavior HoverBackground="{StaticResource SideButtonSelectionBkgBrush}"/>
                	</i:Interaction.Behaviors>
                	<i:Interaction.Triggers>
                		<i:EventTrigger EventName="MouseLeftButtonUp">
                			<n:NavigateAction Url="Pages/FuturePage/WilsonPassContactPage/" HandlerName="EmptyBladeHandler"/>
                		</i:EventTrigger>
                	</i:Interaction.Triggers>
					<Grid Height="Auto" Width="Auto">
						<TextBlock Margin="37,6.166,0,18.834" Text="WILSON PASS" TextWrapping="Wrap" 
                                   Foreground="{StaticResource ForegroundLight1ColourBrush}" FontFamily="Arial" FontSize="17"/>
						<TextBlock Height="Auto" Margin="37,0,0,4.669" VerticalAlignment="Bottom" Text="offline" 
                                   TextWrapping="Wrap" Foreground="#FFD3C7B8" FontFamily="Arial"/>
						<Ellipse HorizontalAlignment="Left" Margin="8,8,0,18.834" Width="14" Height="14" 
                                 Fill="{StaticResource OfflineRadialBkgBrush}" Stroke="{StaticResource OfflineRadialBorderBrush}"/>
					</Grid>
				</Border>
                
                <!-- CALENDER TITLE -->
				<Border Height="40" BorderBrush="{StaticResource SideButtonBorderColourBrush}" Cursor="Hand" 
                        BorderThickness="0,0,0,1" Margin="0,0,0,1" Background="{StaticResource SideButtonSelectionBkgBrush}"
                        ToolTip="{Binding Converter={StaticResource DateTimeConverterRelay}, ConverterParameter=D}" >
					<i:Interaction.Behaviors>
						<hvr:BorderHoverBehavior HoverBackground="{StaticResource SideButtonHightlightBkgBrush}"/>
					</i:Interaction.Behaviors>
					<i:Interaction.Triggers>
						<i:EventTrigger EventName="MouseLeftButtonUp">
							<n:NavigateAction Url="Pages/FuturePage/WebCalander/" HandlerName="EmptyBladeHandler"/>
						</i:EventTrigger>
					</i:Interaction.Triggers> 
                    
					<Grid Height="Auto" Width="Auto">
						<TextBlock Margin="43,0,0,0" Text="TODAY's SCHEDULE" TextWrapping="Wrap"  
                                   Foreground="{StaticResource ForegroundLight1ColourBrush}" FontFamily="Arial" FontSize="14" 
                                   d:LayoutOverrides="Height" VerticalAlignment="Center"/>
						<Rectangle HorizontalAlignment="Left" Margin="8.004,6.875,0,0" Width="18.512" Stroke="{x:Null}"
                                   StrokeThickness="0" VerticalAlignment="Top" Height="21.5">
							<Rectangle.Fill>
								<LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
									<GradientStop Color="#FFA2928A" Offset="0"/>
									<GradientStop Color="#FFFFFFFF" Offset="0.152"/>
								</LinearGradientBrush>
							</Rectangle.Fill>
						</Rectangle>
						<TextBlock HorizontalAlignment="Left" Margin="3,3,0,0" VerticalAlignment="Top" Width="Auto" 
                                   FontFamily="Webdings" FontSize="30" Foreground="{StaticResource ForegroundLight1ColourBrush}" 
                                   Text="¥" TextWrapping="Wrap"/>
						<TextBlock HorizontalAlignment="Left" Margin="8.372,12,0,8.88" x:Name="DateText" Width="19.166" 
                                   FontFamily="Arial" FontSize="14" FontWeight="Bold" Foreground="#FF4A4A4A" 
                                   Text="{Binding Converter={StaticResource DateTimeConverterRelay}, ConverterParameter=dd}"
                                   TextAlignment="Center" />
					</Grid>
				</Border>

                <!-- CALENDER SCHEDULE -->
                <Border Height="170" Width="200" BorderBrush="{StaticResource SideButtonBorderColourBrush}" 
                        BorderThickness="0,0,0,1" Margin="0,0,0,1" Background="#FF7C6E65">
                    
					<Grid Height="Auto" Width="Auto">
						<TextBlock HorizontalAlignment="Left" Margin="8,12,0,9" Width="71" FontFamily="Arial" FontSize="11.5"
                                   FontWeight="Normal" Foreground="{StaticResource ForegroundLight1ColourBrush}" TextAlignment="Right"
                                   TextWrapping="Wrap"><Run Text="9:00 AM"/><LineBreak/><Run Text=""/><LineBreak/><Run Text="10"/><Run Text=" "/><Run Text=":30"/><Run Text=" AM"/><LineBreak/><Run Text=""/><LineBreak/><Run Text="11"/><Run Text=" "/><Run Text=":00"/><Run Text=" AM"/><LineBreak/><Run Text=""/><LineBreak/><Run Text="12"/><Run Text=" "/><Run Text=":00"/><Run Text=" PM"/><LineBreak/><Run Text=""/><LineBreak/><Run Text="2"/><Run Text=" "/><Run Text=":00"/><Run Text=" PM"/><LineBreak/><Run Text=""/><LineBreak/><Run Text="3"/><Run Text=" "/><Run Text=":00"/><Run Text=" PM"/></TextBlock>
                        <TextBlock Margin="95,12,8,9" FontFamily="Arial" FontSize="11.5" FontWeight="Normal" 
                                   Foreground="{StaticResource ForegroundLight1ColourBrush}" TextAlignment="Left" TextWrapping="Wrap"><Run Text="Meeting"/><LineBreak/><Run Text=""/><LineBreak/><Run Text="Call Pam"/><Run Text=" "/><LineBreak/><Run Text=""/><LineBreak/><Run Text="Math Class"/><LineBreak/><Run Text=""/><Run Text=" "/><LineBreak/><Run Text="Pure Math Class "/><LineBreak/><Run Text=""/><LineBreak/><Run Text="-"/><Run Text=" "/><LineBreak/><Run Text=""/><LineBreak/><Run Text="Submit Report.."/></TextBlock>		
                        
					</Grid>
				</Border>
                
                <!-- INBOX BUTTON -->
				<Border Height="35" Width="200" BorderBrush="{StaticResource SideButtonBorderColourBrush}" 
                        BorderThickness="0,0,0,1" Margin="0,0,0,1" Cursor="Hand">
					<i:Interaction.Behaviors>
						<hvr:BorderHoverBehavior HoverBackground="{StaticResource SideButtonHightlightBkgBrush}"/>
					</i:Interaction.Behaviors>
					<i:Interaction.Triggers>
						<i:EventTrigger EventName="MouseLeftButtonUp">
							<n:NavigateAction Url="Pages/FuturePage/Inbox/"/>
						</i:EventTrigger>
					</i:Interaction.Triggers>
					<Grid Height="Auto" Width="Auto">
						<TextBlock Margin="37,0,0,0" Text="INBOX" TextWrapping="Wrap" FontFamily="Arial" FontSize="14" 
                                   Foreground="{StaticResource ForegroundLight1ColourBrush}" VerticalAlignment="Center"/>
						<TextBlock Height="Auto" Margin="12,0,0,0" Text="1" TextWrapping="Wrap" Foreground="#FFBDBDBD" 
                                   FontFamily="Arial" HorizontalAlignment="Left" Width="15" FontSize="12" d:LayoutOverrides="Height"
                                   VerticalAlignment="Center" FontWeight="Normal"/>
					</Grid>
				</Border>

                <!-- NOTIFICATIONS BUTTON -->
                <Border Height="35" Width="200" BorderBrush="{StaticResource SideButtonBorderColourBrush}" 
                        BorderThickness="0,0,0,1" Margin="0,0,0,1"  Cursor="Hand">
                	<i:Interaction.Behaviors>
                		<hvr:BorderHoverBehavior HoverBackground="{StaticResource SideButtonHightlightBkgBrush}"/>
                	</i:Interaction.Behaviors>
                	<i:Interaction.Triggers>
                		<i:EventTrigger EventName="MouseLeftButtonUp">
                			<n:NavigateAction Url="Pages/FuturePage/Notifications/"/>
                		</i:EventTrigger>
                	</i:Interaction.Triggers>
					<Grid Height="Auto" Width="Auto">
						<TextBlock Margin="37,0,0,0" Text="NOTIFICATIONs" TextWrapping="Wrap" 
                                   Foreground="{StaticResource ForegroundLight1ColourBrush}" FontFamily="Arial" FontSize="14" 
                                   VerticalAlignment="Center"/>
						<TextBlock Height="Auto" Margin="12,0,0,0" Text="2" TextWrapping="Wrap" Foreground="#FFBDBDBD" 
                                   FontFamily="Arial" HorizontalAlignment="Left" Width="15" FontSize="12" 
                                   d:LayoutOverrides="Height" VerticalAlignment="Center" FontWeight="Normal"/>
					</Grid>
				</Border>
                
                <!-- SCHOOL STUFF BUTTON -->
				<Border Height="35" Width="200" BorderBrush="{StaticResource SideButtonBorderColourBrush}" 
                        BorderThickness="0,0,0,1" Margin="0,0,0,1" Cursor="Hand">
					<i:Interaction.Behaviors>
						<hvr:BorderHoverBehavior HoverBackground="{StaticResource SideButtonHightlightBkgBrush}"/>
					</i:Interaction.Behaviors>
					<i:Interaction.Triggers>
						<i:EventTrigger EventName="MouseLeftButtonUp">
							<n:NavigateAction Url="Pages/FuturePage/SchoolStuff/"/>
						</i:EventTrigger>
					</i:Interaction.Triggers>
					<Grid Height="Auto" Width="Auto">
						<TextBlock Margin="37,0,0,0" Text="SCHOOL STUFF" TextWrapping="Wrap" VerticalAlignment="Center"
                                   Foreground="{StaticResource ForegroundLight1ColourBrush}" FontFamily="Arial" FontSize="14"/>
						<TextBlock Height="Auto" Margin="12,0,0,0" Text="3" TextWrapping="Wrap"  VerticalAlignment="Center"
                                   Foreground="{StaticResource ForegroundLight3ColourBrush}" FontFamily="Arial" 
                                   HorizontalAlignment="Left" Width="15" FontSize="12" d:LayoutOverrides="Height"/>
					</Grid>
				</Border>
                
                <!-- MY STUFF -->
				<Border Height="35" Width="200" BorderBrush="{StaticResource SideButtonBorderColourBrush}" 
                        BorderThickness="0,0,0,1" Margin="0,0,0,1" Cursor="Hand">
					<i:Interaction.Behaviors>
						<hvr:BorderHoverBehavior HoverBackground="{StaticResource SideButtonHightlightBkgBrush}"/>
					</i:Interaction.Behaviors>
					<i:Interaction.Triggers>
						<i:EventTrigger EventName="MouseLeftButtonUp">
							<n:NavigateAction Url="Pages/FuturePage/MyStuff/"/>
						</i:EventTrigger>
					</i:Interaction.Triggers>
					<Grid Height="Auto" Width="Auto">
						<TextBlock Margin="37,0,0,0" Text="MY STUFF" TextWrapping="Wrap" 
                                   Foreground="{StaticResource ForegroundLight1ColourBrush}" FontFamily="Arial" FontSize="14" 
                                   VerticalAlignment="Center"/>
						<TextBlock Height="Auto" Margin="12,0,0,0" Text="4" TextWrapping="Wrap" 
                                   Foreground="{StaticResource ForegroundLight3ColourBrush}" FontFamily="Arial" 
                                   HorizontalAlignment="Left" Width="15" FontSize="12" d:LayoutOverrides="Height" 
                                   VerticalAlignment="Center"/>
					</Grid>
				</Border>
			</StackPanel>
            
            <!-- POWERED BY TEXT at right top -->
            <!-- HyperlinkButton -->
            
            <!-- SIDE ICON BUTTONS -->
			<Canvas Margin="-60,-169,0,5" x:Name="BottomIconsGrid" Grid.Row="1" Width="124" Grid.Column="1" 
                    HorizontalAlignment="Left">
				<TextBlock Height="41" Width="50" Canvas.Left="4" FontFamily="Webdings" FontSize="48" Cursor="Hand"
                           Foreground="{StaticResource ForegroundLight1ColourBrush}" Text="¬" TextWrapping="Wrap">
					<i:Interaction.Behaviors>
						<hvr:TextBlockHoverBehavior HoverForeground="{StaticResource ForegroundLight2ColourBrush}"/>
					</i:Interaction.Behaviors>
					<i:Interaction.Triggers>
						<i:EventTrigger EventName="MouseLeftButtonUp">
							<n:NavigateAction Url="Pages/FuturePage/Folders"/>
						</i:EventTrigger>
					</i:Interaction.Triggers>
				</TextBlock>
				<TextBlock Height="41" FontFamily="Webdings" FontSize="48" Foreground="{StaticResource ForegroundLight1ColourBrush}" 
                           Text="^"  Cursor="Hand" TextWrapping="Wrap" Width="50" Canvas.Top="63" Canvas.Left="4">
					<i:Interaction.Behaviors>
						<hvr:TextBlockHoverBehavior HoverForeground="{StaticResource ForegroundLight2ColourBrush}"/>
					</i:Interaction.Behaviors>
					<i:Interaction.Triggers>
						<i:EventTrigger EventName="MouseLeftButtonUp">
							<n:NavigateAction Url="Pages/FuturePage/OfficeMessanger"/>
						</i:EventTrigger>
					</i:Interaction.Triggers>
				</TextBlock>
				<TextBlock FontFamily="Webdings" FontSize="48" Foreground="{StaticResource ForegroundLight1ColourBrush}" 
                           Text="Â" TextWrapping="Wrap" Height="41" Width="50" RenderTransformOrigin="1,1.756" 
                           Canvas.Left="4" Canvas.Top="120" Cursor="Hand">
					<i:Interaction.Behaviors>
						<hvr:TextBlockHoverBehavior HoverForeground="{StaticResource ForegroundLight2ColourBrush}"/>
					</i:Interaction.Behaviors>
					<i:Interaction.Triggers>
						<i:EventTrigger EventName="MouseLeftButtonUp">
							<n:NavigateAction Url="Pages/FuturePage/SyncManager"/>
						</i:EventTrigger>
					</i:Interaction.Triggers>
				</TextBlock>
				<TextBlock FontFamily="Webdings" FontSize="42" Foreground="{StaticResource ForegroundLight1ColourBrush}" 
                           Text="" TextWrapping="Wrap" Height="41" Width="50" Canvas.Left="6" Canvas.Top="177" 
                           d:LayoutOverrides="GridBox" Cursor="Hand">
					<i:Interaction.Behaviors>
						<hvr:TextBlockHoverBehavior HoverForeground="{StaticResource ForegroundLight2ColourBrush}"/>
					</i:Interaction.Behaviors>
					<i:Interaction.Triggers>
						<i:EventTrigger EventName="MouseLeftButtonUp">
							<n:NavigateAction Url="Pages/FuturePage/ContactsBook"/>
						</i:EventTrigger>
					</i:Interaction.Triggers>
				</TextBlock>
				<TextBlock FontFamily="Webdings" FontSize="48" Text="&gt;" TextWrapping="Wrap" RenderTransformOrigin="1,1.756" 
                           Height="41" Width="50" Canvas.Left="73.5" Canvas.Top="172" Cursor="Hand"
                           Foreground="{StaticResource ForegroundLight1ColourBrush}">
					<i:Interaction.Behaviors>
						<hvr:TextBlockHoverBehavior HoverForeground="{StaticResource ForegroundLight2ColourBrush}"/>
					</i:Interaction.Behaviors>
					<i:Interaction.Triggers>
						<i:EventTrigger EventName="MouseLeftButtonUp">
							<n:NavigateAction Url="Pages/FuturePage/Settings"/>
						</i:EventTrigger>
					</i:Interaction.Triggers>
				</TextBlock>
			</Canvas>
            
            <!-- MAIN CONTENT BODY -->
            <Grid Grid.Column="1" Background="{StaticResource WorkspaceBkgLinearBrush}" x:Name="ContentGrid">
                            	
                <!-- WORKSPACEs -->
                <ItemsControl x:Name="WorkspacesItemsControl" ItemsSource="{Binding Workspaces}" 
            		ItemTemplate="{StaticResource WorkspaceDataTemplate}">
            		<ItemsControl.ItemsPanel>
            			<ItemsPanelTemplate>
            				<local:WorkspacesStackPanel HorizontalAlignment="Stretch" VerticalAlignment="Stretch" />
            			</ItemsPanelTemplate>
            		</ItemsControl.ItemsPanel>
            	</ItemsControl> 
                
                <!-- TOP EDGE EFFECT -->
            	<Rectangle Height="30" Margin="0,0,0,0" VerticalAlignment="Top" IsHitTestVisible="False" 
                           Visibility="Visible" Stroke="{x:Null}" StrokeThickness="0" 
                           Fill="{StaticResource WorkspaceTopBumpBrush}" d:IsHidden="True"/>
                
            </Grid>
        </Grid>
	</Border>
</Window>